//
//  UITextField+YCTools.h
//  Pods
//
//  Created by Apple on 2022/11/2.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UITextField (YCTools)

/// 限制最大长度
@property (nonatomic, assign) NSInteger maxLength;
/// 限制的数字最大值
@property (nonatomic, assign) CGFloat maxNumber;
/// 只能够输入数字 默认NO
@property (nonatomic, assign) BOOL justNumber;
/// 只能够输入数字和点 默认NO
@property (nonatomic, assign) BOOL moneyType;
/// 禁止输入表情，默认NO
@property (nonatomic, assign) BOOL disableEmoji;
/// 禁止输入特殊字符，默认NO
@property (nonatomic, assign) BOOL disableSpecialCharacters;
/// 小数点位数限制
@property (nonatomic, assign) NSInteger pointNumber;


+ (UITextField *)textFieldWithFrame:(CGRect)frame
                          textColor:(UIColor *)textColor
                               font:(UIFont *)font
                        placeholder:(NSString *)placeholder;

+ (UITextField *)textFieldWithFrame:(CGRect)frame
                          textColor:(UIColor *)textColor
                               font:(UIFont *)font
                        placeholder:(NSString *)placeholder
                      textAlignment:(NSTextAlignment)textAlignment;

+ (UITextField *)textFieldWithFrame:(CGRect)frame
                          textColor:(UIColor *)textColor
                               font:(UIFont *)font
                        placeholder:(NSString *)placeholder
                      textAlignment:(NSTextAlignment)textAlignment
                       keyboardType:(UIKeyboardType)keyboardType;

+ (UITextField *)textFieldWithFrame:(CGRect)frame
                          textColor:(UIColor *)textColor
                               font:(UIFont *)font
                        placeholder:(NSString *)placeholder
                      textAlignment:(NSTextAlignment)textAlignment
                       keyboardType:(UIKeyboardType)keyboardType
                        borderStyle:(UITextBorderStyle)borderStyle;

+ (UITextField *)textFieldWithFrame:(CGRect)frame
                          textColor:(UIColor *)textColor
                               font:(UIFont *)font
                        placeholder:(NSString *)placeholder
                      textAlignment:(NSTextAlignment)textAlignment
                       keyboardType:(UIKeyboardType)keyboardType
                        borderStyle:(UITextBorderStyle)borderStyle
                           leftView:(UIView *)leftView;

@end

NS_ASSUME_NONNULL_END
